package com.new4net.exe_stream.instruction;

import com.new4net.exe_stream.instruction.impl.ExecuteResult;
import com.new4net.exe_stream.meta.ExecutionContext;
import com.new4net.exe_stream.listener.InstructionListener;

import java.util.Date;

public interface Instruction extends Runnable {
    String getInstructionName();

    ExecutionContext.InstructionContext getInstructionContext();

    String getInstuctionType();
    ExecuteResult getExecuteResult();
    void retry();
    ExecutionContext getExecutionContext();
    void setExecutionContext(ExecutionContext executionContext);
    Instruction addInstructionListener(InstructionListener instructionListener);
    String getInstructionId();

    Date getExeStartTime();

    Date getExeEndTime();


    default boolean isLeaf(){
        return true;
    }


}
